package com.wuchao.spring.aoppro;

import com.wuchao.entity.Entry;
import com.wuchao.spring.aoppro.pointcuts.PointCut;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;

/**
 * @Author wuchao66
 * @Date 2023/9/23 10:31
 * @PackageName:com.wuchao.spring.aoppro
 * @ClassName: TestAop
 * @Description: TODO
 * @Param
 * @Version 1.0
 */
public class TestAop {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext cpac =
                new ClassPathXmlApplicationContext("ApplicationContext.xml");
//        ((PointCut)cpac.getBean("pointCut")).
//                show(new Entry().setTitle("aop2134567890"));
        ((PointCut)cpac.getBean("pointCut")).
                show1();
        //遍历bean
//     Arrays.asList(cpac.getBeanDefinitionNames())
//             .forEach(xjj-> System.out.println(xjj));
    }
}
